<include file="Common/header" />
<title>收费单据</title>
</head>
<body>
<nav class="breadcrumb">
	<i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 费用管理 
	<span class="c-gray en">&gt;</span> 收费单据 <span class="c-gray en">&gt;</span> {$info['costorder_sn']}
	<a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" >
		<i class="Hui-iconfont">&#xe68f;</i>
	</a>
</nav>
<div class="pd-20">
	<div class="dataTables_wrapper no-footer" id="ajaxDiv">
		<table class="table table-border table-bordered table-hover table-bg">
			<thead>
				<tr class="text-c">
					<th colspan="7">收款凭证</th>
				</tr>
				<tr class="text-c">
					<th>收据单号：</th>
					<td>{$info['costorder_sn']}</td>
					<th>收款日期：</th>
					<td>{$info['createtime']|date="Y-m-d", ###}</td>
					<th></th>
					<td></td>
				</tr>
				<tr class="text-c">
					<th>房间名称：</th>
					<td>{$info['room_title']}</td>
					<th>业主姓名：</th>
					<td>{$info['owner_name']}</td>
					<th></th>
					<td></td>
				</tr>
				<tr class="text-c">
					<td colspan="6"></td>
				</tr>
			</thead>
			<thead>
				<tr class="text-c">
					<th>费项名称</th>
					<th>费用日期</th>
					<th>应缴费用</th>
					<th>滞纳金</th>
					<th>实缴费用</th>
					<th>缴费方式</th>
				</tr>
			</thead>
			<tbody>
				<?php if(is_array($list) && count($list)){ ?>
					<?php foreach($list as $k=>$ls){ ?>
						<tr class="text-c">
							<td>{$ls['costtype_title']}</td>
							<td>{$ls['costlog_times']}</td>
							<td><p class="c-success">{$ls['costlog_point']}</p></td>
							<td><p class="c-error">{$ls['costlog_latefee_account']}</p></td>
							<td><p class="c-primary">{$ls['costlog_account']}</p></td>
							<td><?php switch($ls['costlog_paytype']){
								case 1:
									echo '现金';
								break;
								case 2:
									echo '支付宝';
								break;
								case 3:
									echo '微信';
								break;
							} ?></td>
						</tr>
					<?php }?>
				<?php }else{ ?>
				<tr class="text-c">
					<td colspan="19" >暂无数据...</td>
				</tr>
				<?php } ?>
			</tbody>
			<thead>
				<tr class="text-c">
					<th>合计金额(大写)</th>
					<td colspan="3" class="text-l">{$info['bigstring']}</td>
					<td>本次应收：￥{$info['costorder_account']}</td>
					<td>本次实收：￥{$info['costorder_paycount']}</td>
				</tr>
				<tr class="text-c">
					<td colspan="4"></td>
					<td>优惠金额：￥{$info['costorder_discount']}</td>
					<td>预收款余额：￥0.00</td>
				</tr>
				<tr class="text-c">
					<td colspan="6"></td>
				</tr>
				<tr class="text-c">
					<td>财务盖章</td>
					<td colspan="4"></td>
					<td>收款人：{$info['costlog_adminnick']}</td>
				</tr>
			</thead>
		</table>
	</div>
	<div class="text-c" style="padding-top:30px;">
		<a href="javascript:;" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe644;</i> 导出</a> 
		<a href="javascript:;" class="btn btn-success radius"><i class="Hui-iconfont">&#xe652;</i> 打印</a> 
	</div>	
</div>

<script type="text/javascript">
	$(function(){
		$("#stime").on('click', function(){
			laydate({istime: true, format: 'YYYY-MM-DD'});
		});
		
		//按条件查询
		$(".btn-success").on('click', function(){
			var load = layer.load(2);
			var where = {};
				where.project_id = $("#project_id").val();
				where.costlog_status = $("#costlog_status").val();
				where.owner_name = $("#owner_name").val();
				where.costlog_times = $("#stime").val();
				where.ajax = 1;
			$.get('order.html', where, function(data){
				layer.close(load);
				$("#ajaxDiv").html(data);
			});
		});
	});
</script>
</body>
</html>